<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Language" content="en" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Datepicker Demo</title>
<link rel="stylesheet" href="../themes/flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)" />
<link rel="stylesheet" href="css/style.css" type="text/css" />
<style type="text/css">
pre { border: 1px solid #50A029; padding: 5px; padding-top: 15px; }
.codeLink { text-decoration: underline; }
</style>

<script src="../jquery-1.2.3.min.js" type="text/javascript"></script>

<script type="text/javascript" src="../datepicker/core/ui.datepicker.js"></script>
<script type="text/javascript" src="../datepicker/i18n/ui.datepicker-fr.js"></script>
</head>
<body class="flora">
<h1>Datepicker</h1>

<h2>1. Default</h2>
<div class="playground">
	<p>Datepicker appears on focus - click in the field.
		The text is in English and the date format is US (mm/dd/yyyy).</p>
	<input type="text" id="example1" size="10"/>
	<script type="text/jsdemo" charset="utf-8" class="demojs">
	$('#example1').datepicker();	
	</script>
</div>

<h2>2. Enhanced</h2>
<div class="playground">
	<p>Datepicker appears on focus or icon click.
		It shows days in other months and the week of the year.</p>
	<input type="text" id="example2" size="10"/>
	<script type="text/jsdemo" charset="utf-8" class="demojs">
	$('#example2').datepicker({showOn: 'both', showOtherMonths: true, 
		showWeeks: true, firstDay: 1, changeFirstDay: false,
		buttonImageOnly: true, buttonImage: '../datepicker/img/calendar.gif'});	
	</script>
</div>

<h2>3. Localized</h2>
<div class="playground">
	<p>The datepicker can be localized for a large number of languages.
		Here is the French version.</p>
	<input type="text" id="example3" size="10"/>
	<script type="text/jsdemo" charset="utf-8" class="demojs">
	$('#example3').datepicker($.extend({showOn: 'both',
		buttonImageOnly: true, buttonImage: '../datepicker/img/calendar.gif'},
		$.datepicker.regional['fr']));
	</script>
</div>

<h2>4. Formats</h2>
<div class="playground">
	<p>The date can appear in a number of different formats with the 
		default being 'mm/dd/yyyy'. This example shows the full
		format with day and month names.</p>
	<input type="text" id="example4" size="30"/>
	<script type="text/jsdemo" charset="utf-8" class="demojs">
	$('#example4').datepicker({dateFormat: 'DD, MM d, yy', showOn: 'both', 
		buttonImageOnly: true, buttonImage: '../datepicker/img/calendar.gif'});	
	</script>
</div>

<h2>5. Date range</h2>
<div class="playground">
	<p>Pick a date range by selecting the start and end date.
		Several months are shown at once.</p>
	<input type="text" id="example5" size="24"/>
	<script type="text/jsdemo" charset="utf-8" class="demojs">
	$('#example5').datepicker({rangeSelect: true, numberOfMonths: 3, stepMonths: 3, 
		showOn: 'both', buttonImageOnly: true, buttonImage: '../datepicker/img/calendar.gif'});	
	</script>
</div>

<h2>6. Inline</h2>
<div class="playground">
	<p>The datepicker can also appear inline and notify the page when selected.</p>
	<div id="example6"></div>
	<div style="clear: both;"></div>
	<script type="text/jsdemo" charset="utf-8" class="demojs">
	$('#example6').datepicker({onSelect: function(date) { alert('You selected ' + date); }});	
	</script>
</div>

<h2>More...</h2>
<div class="playground">
	<p>The datepicker can do even more. Check out the full demonstration on the
		<a href="http://marcgrabanski.com/code/ui-datepicker/">datepicker home page</a>.</p>
</div>

<script type="text/javascript">
if (!window.console) {
	window.console = {
		log: function() {
			alert(arguments[0]);	
		}
	}
}

$(window).bind("load",function(){
	$.datepicker.setDefaults($.datepicker.regional['']);
	$(".demojs").each(function () {
		$(this).before('<div class="codeLink">Show the code</div>' +
			'<pre style="display: none;">' + $(this).html() + '</pre>');
		$('.codeLink').click(function() {
			$(this).hide().siblings('pre').show();
		});
		eval($(this).html());
	});
});
</script>
</body>
</html>
